package com.wench.design.pattern.factory.factory_method;

/**
 * @author wench
 */
public class FactoryMethodClient {

    public static void main(String[] args) {
        CoffeeStore store = new CoffeeStore();
        CoffeeFactory factory = new AmericanCoffeeFactory();
        store.setFactory(factory);
        Coffee american = store.orderCoffee();
        System.out.println(" ==> " + american.getName() + " <== ");
        System.out.println("==============================");
        LatteCoffeeFactory latteCoffeeFactory = new LatteCoffeeFactory();
        store.setFactory(latteCoffeeFactory);
        Coffee latte = store.orderCoffee();
        System.out.println(" ==> " + latte.getName() + " <== ");
    }

}
